﻿using ConfExpert.Forms.Base;
using ConfExpert.Utility;
using DevTeam;
using System;
using System.Data;

namespace ConfExpert.Forms.Depo._7C
{
    public partial class KumasFazlasi : XForm
    {
        int CKBatchId;
        public KumasFazlasi(int CKBatchId)
        {
            InitializeComponent();
            this.CKBatchId = CKBatchId;
            this.Text += "- " + AppSession.Lookups.CKBatch.FindByCKBatchId(CKBatchId).Notes;
        }

        private void KumasFazlasi_Load(object sender, EventArgs e)
        {
            DataSet d = ExecuteDataSet("GpKumasFazlasi", CKBatchId);
            gridView1.Init(d.Tables[0].Copy());
            gridView2.Init(d.Tables[1].Copy());
            gridView1.FormatAsNumber(1, "Qty");
            gridView2.FormatAsNumber(1, "Qty");
            gridView2.MakeColumnInvisible("RFIDset", "ProductId", "GelisPartisiLinesId", "CustomerId");
            gridView1.AddSummary("Qty");
            gridView2.AddSummary("Qty");

            gridView1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Top;

            gridView1.BestFitColumns();
            gridView2.BestFitColumns();
        }
    }
}
